package com.zlyx.easy.swagger.config;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;

import com.zlyx.easy.core.map.TableMap;

/**
 * @Auth 赵光
 * @Describle
 */
public class ApiCache {

	private static TableMap<String> groups = TableMap.newMap();

	public static Map<String, Collection<String>> getApis() {
		return groups;
	}

	public static void addApis(Map<String, List<String>> groupNames) {
		if (groupNames != null) {
			for (String host : groupNames.keySet()) {
				groups.addValue(host, groupNames.get(host));
			}
		}
	}

	public static void addApis(String host, Set<String> groupNames) {
		groups.addValue(host, groupNames);
	}
}
